home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / dev / gg / gengetopt-2.6.lha / gengetopt-2.6 / src / scanner.c < prev    next >
C/C++ Source or Header  |  2002-03-01  |  43KB  |  1,737 lines

  1. /* A lexical scanner generated by flex */
  2.  
  3. /* Scanner skeleton version:
  4.  * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
  5.  */
  6.  
  7. #define FLEX_SCANNER
  8. #define YY_FLEX_MAJOR_VERSION 2
  9. #define YY_FLEX_MINOR_VERSION 5
  10.  
  11. #include <stdio.h>
  12.  
  13.  
  14. /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
  15. #ifdef c_plusplus
  16. #ifndef __cplusplus
  17. #define __cplusplus
  18. #endif
  19. #endif
  20.  
  21.  
  22. #ifdef __cplusplus
  23.  
  24. #include <stdlib.h>
  25. #include <unistd.h>
  26.  
  27. /* Use prototypes in function declarations. */
  28. #define YY_USE_PROTOS
  29.  
  30. /* The "const" storage-class-modifier is valid. */
  31. #define YY_USE_CONST
  32.  
  33. #else    /* ! __cplusplus */
  34.  
  35. #if __STDC__
  36.  
  37. #define YY_USE_PROTOS
  38. #define YY_USE_CONST
  39.  
  40. #endif    /* __STDC__ */
  41. #endif    /* ! __cplusplus */
  42.  
  43. #ifdef __TURBOC__
  44.  #pragma warn -rch
  45.  #pragma warn -use
  46. #include <io.h>
  47. #include <stdlib.h>
  48. #define YY_USE_CONST
  49. #define YY_USE_PROTOS
  50. #endif
  51.  
  52. #ifdef YY_USE_CONST
  53. #define yyconst const
  54. #else
  55. #define yyconst
  56. #endif
  57.  
  58.  
  59. #ifdef YY_USE_PROTOS
  60. #define YY_PROTO(proto) proto
  61. #else
  62. #define YY_PROTO(proto) ()
  63. #endif
  64.  
  65. /* Returned upon end-of-file. */
  66. #define YY_NULL 0
  67.  
  68. /* Promotes a possibly negative, possibly signed char to an unsigned
  69.  * integer for use as an array index.  If the signed char is negative,
  70.  * we want to instead treat it as an 8-bit unsigned char, hence the
  71.  * double cast.
  72.  */
  73. #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
  74.  
  75. /* Enter a start condition.  This macro really ought to take a parameter,
  76.  * but we do it the disgusting crufty way forced on us by the ()-less
  77.  * definition of BEGIN.
  78.  */
  79. #define BEGIN yy_start = 1 + 2 *
  80.  
  81. /* Translate the current start state into a value that can be later handed
  82.  * to BEGIN to return to the state.  The YYSTATE alias is for lex
  83.  * compatibility.
  84.  */
  85. #define YY_START ((yy_start - 1) / 2)
  86. #define YYSTATE YY_START
  87.  
  88. /* Action number for EOF rule of a given start state. */
  89. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  90.  
  91. /* Special action meaning "start processing a new file". */
  92. #define YY_NEW_FILE yyrestart( yyin )
  93.  
  94. #define YY_END_OF_BUFFER_CHAR 0
  95.  
  96. /* Size of default input buffer. */
  97. #define YY_BUF_SIZE 16384
  98.  
  99. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  100.  
  101. extern int yyleng;
  102. extern FILE *yyin, *yyout;
  103.  
  104. #define EOB_ACT_CONTINUE_SCAN 0
  105. #define EOB_ACT_END_OF_FILE 1
  106. #define EOB_ACT_LAST_MATCH 2
  107.  
  108. /* The funky do-while in the following #define is used to turn the definition
  109.  * int a single C statement (which needs a semi-colon terminator).  This
  110.  * avoids problems with code like:
  111.  *
  112.  *     if ( condition_holds )
  113.  *        yyless( 5 );
  114.  *    else
  115.  *        do_something_else();
  116.  *
  117.  * Prior to using the do-while the compiler would get upset at the
  118.  * "else" because it interpreted the "if" statement as being all
  119.  * done when it reached the ';' after the yyless() call.
  120.  */
  121.  
  122. /* Return all but the first 'n' matched characters back to the input stream. */
  123.  
  124. #define yyless(n) \
  125.     do \
  126.         { \
  127.         /* Undo effects of setting up yytext. */ \
  128.         *yy_cp = yy_hold_char; \
  129.         YY_RESTORE_YY_MORE_OFFSET \
  130.         yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
  131.         YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  132.         } \
  133.     while ( 0 )
  134.  
  135. #define unput(c) yyunput( c, yytext_ptr )
  136.  
  137. /* The following is because we cannot portably get our hands on size_t
  138.  * (without autoconf's help, which isn't available because we want
  139.  * flex-generated scanners to compile on their own).
  140.  */
  141. typedef unsigned int yy_size_t;
  142.  
  143.  
  144. struct yy_buffer_state
  145.     {
  146.     FILE *yy_input_file;
  147.  
  148.     char *yy_ch_buf;        /* input buffer */
  149.     char *yy_buf_pos;        /* current position in input buffer */
  150.  
  151.     /* Size of input buffer in bytes, not including room for EOB
  152.      * characters.
  153.      */
  154.     yy_size_t yy_buf_size;
  155.  
  156.     /* Number of characters read into yy_ch_buf, not including EOB
  157.      * characters.
  158.      */
  159.     int yy_n_chars;
  160.  
  161.     /* Whether we "own" the buffer - i.e., we know we created it,
  162.      * and can realloc() it to grow it, and should free() it to
  163.      * delete it.
  164.      */
  165.     int yy_is_our_buffer;
  166.  
  167.     /* Whether this is an "interactive" input source; if so, and
  168.      * if we're using stdio for input, then we want to use getc()
  169.      * instead of fread(), to make sure we stop fetching input after
  170.      * each newline.
  171.      */
  172.     int yy_is_interactive;
  173.  
  174.     /* Whether we're considered to be at the beginning of a line.
  175.      * If so, '^' rules will be active on the next match, otherwise
  176.      * not.
  177.      */
  178.     int yy_at_bol;
  179.  
  180.     /* Whether to try to fill the input buffer when we reach the
  181.      * end of it.
  182.      */
  183.     int yy_fill_buffer;
  184.  
  185.     int yy_buffer_status;
  186. #define YY_BUFFER_NEW 0
  187. #define YY_BUFFER_NORMAL 1
  188.     /* When an EOF's been seen but there's still some text to process
  189.      * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  190.      * shouldn't try reading from the input source any more.  We might
  191.      * still have a bunch of tokens to match, though, because of
  192.      * possible backing-up.
  193.      *
  194.      * When we actually see the EOF, we change the status to "new"
  195.      * (via yyrestart()), so that the user can continue scanning by
  196.      * just pointing yyin at a new input file.
  197.      */
  198. #define YY_BUFFER_EOF_PENDING 2
  199.     };
  200.  
  201. static YY_BUFFER_STATE yy_current_buffer = 0;
  202.  
  203. /* We provide macros for accessing buffer states in case in the
  204.  * future we want to put the buffer states in a more general
  205.  * "scanner state".
  206.  */
  207. #define YY_CURRENT_BUFFER yy_current_buffer
  208.  
  209.  
  210. /* yy_hold_char holds the character lost when yytext is formed. */
  211. static char yy_hold_char;
  212.  
  213. static int yy_n_chars;        /* number of characters read into yy_ch_buf */
  214.  
  215.  
  216. int yyleng;
  217.  
  218. /* Points to current character in buffer. */
  219. static char *yy_c_buf_p = (char *) 0;
  220. static int yy_init = 1;        /* whether we need to initialize */
  221. static int yy_start = 0;    /* start state number */
  222.  
  223. /* Flag which is used to allow yywrap()'s to do buffer switches
  224.  * instead of setting up a fresh yyin.  A bit of a hack ...
  225.  */
  226. static int yy_did_buffer_switch_on_eof;
  227.  
  228. void yyrestart YY_PROTO(( FILE *input_file ));
  229.  
  230. void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
  231. void yy_load_buffer_state YY_PROTO(( void ));
  232. YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
  233. void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
  234. void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
  235. void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
  236. #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
  237.  
  238. YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
  239. YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
  240. YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
  241.  
  242. static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
  243. static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
  244. static void yy_flex_free YY_PROTO(( void * ));
  245.  
  246. #define yy_new_buffer yy_create_buffer
  247.  
  248. #define yy_set_interactive(is_interactive) \
  249.     { \
  250.     if ( ! yy_current_buffer ) \
  251.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
  252.     yy_current_buffer->yy_is_interactive = is_interactive; \
  253.     }
  254.  
  255. #define yy_set_bol(at_bol) \
  256.     { \
  257.     if ( ! yy_current_buffer ) \
  258.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
  259.     yy_current_buffer->yy_at_bol = at_bol; \
  260.     }
  261.  
  262. #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
  263.  
  264. typedef unsigned char YY_CHAR;
  265. FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
  266. typedef int yy_state_type;
  267. extern char *yytext;
  268. #define yytext_ptr yytext
  269.  
  270. static yy_state_type yy_get_previous_state YY_PROTO(( void ));
  271. static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
  272. static int yy_get_next_buffer YY_PROTO(( void ));
  273. static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
  274.  
  275. /* Done after the current pattern has been matched and before the
  276.  * corresponding action - sets up yytext.
  277.  */
  278. #define YY_DO_BEFORE_ACTION \
  279.     yytext_ptr = yy_bp; \
  280.     yyleng = (int) (yy_cp - yy_bp); \
  281.     yy_hold_char = *yy_cp; \
  282.     *yy_cp = '\0'; \
  283.     yy_c_buf_p = yy_cp;
  284.  
  285. #define YY_NUM_RULES 27
  286. #define YY_END_OF_BUFFER 28
  287. static yyconst short int yy_accept[98] =
  288.     {   0,
  289.         0,    0,   28,   26,   23,   25,   26,   24,   20,   19,
  290.        20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
  291.        23,    0,    0,   21,   24,    0,    0,    0,    0,    0,
  292.        13,    0,   15,    0,    0,    0,    0,    0,    0,    0,
  293.        22,    0,    0,    0,    0,    5,    0,   16,    0,    0,
  294.         0,    0,    0,    0,   12,    0,    0,   14,    0,    7,
  295.         0,    0,    0,    0,    0,    0,    0,    0,    8,    0,
  296.         0,    0,    0,    0,    6,    0,    0,    0,    9,    0,
  297.         0,    3,    0,    0,    4,    0,   18,    0,    0,    1,
  298.        17,    2,    0,   11,    0,   10,    0
  299.  
  300.     } ;
  301.  
  302. static yyconst int yy_ec[256] =
  303.     {   0,
  304.         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
  305.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  306.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  307.         1,    2,    1,    4,    5,    1,    1,    1,    1,    1,
  308.         1,    1,    1,    1,    6,    1,    1,    6,    6,    6,
  309.         6,    6,    6,    6,    6,    6,    6,    1,    1,    1,
  310.         7,    1,    1,    1,    8,    9,   10,   11,   12,   13,
  311.        14,   15,   16,    6,   17,   18,    6,   19,   20,   21,
  312.         6,   22,   23,   24,   25,   26,    6,    6,   27,    6,
  313.         1,    1,    1,    1,    1,    1,    8,    9,   10,   11,
  314.  
  315.        12,   13,   14,   15,   16,    6,   17,   18,    6,   19,
  316.        20,   21,    6,   22,   23,   24,   25,   26,    6,    6,
  317.        27,    6,    1,    1,    1,    1,    1,    1,    1,    1,
  318.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  319.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  320.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  321.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  322.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  323.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  324.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  325.  
  326.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  327.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  328.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  329.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  330.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  331.         1,    1,    1,    1,    1
  332.     } ;
  333.  
  334. static yyconst int yy_meta[28] =
  335.     {   0,
  336.         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
  337.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  338.         1,    1,    1,    1,    1,    1,    1
  339.     } ;
  340.  
  341. static yyconst short int yy_base[101] =
  342.     {   0,
  343.         0,    0,  110,  111,  107,  111,   25,    0,  111,  111,
  344.        18,   90,   88,   86,   85,   18,   24,   18,   92,   91,
  345.       100,   31,   97,  111,    0,   87,   74,   28,   74,   78,
  346.       111,   83,  111,   71,   84,   71,   72,   69,   68,   66,
  347.       111,   80,   78,   72,   77,  111,   70,  111,   67,   65,
  348.        60,   58,   63,   55,  111,   52,   58,  111,   51,   29,
  349.        54,   65,   52,   47,   51,   53,   50,   55,  111,   46,
  350.        45,   45,   49,   39,  111,   47,   40,   35,  111,   33,
  351.        38,  111,   44,   43,  111,   35,  111,   37,   31,  111,
  352.       111,  111,   26,  111,   31,  111,  111,   49,   40,   51
  353.  
  354.     } ;
  355.  
  356. static yyconst short int yy_def[101] =
  357.     {   0,
  358.        97,    1,   97,   97,   97,   97,   98,   99,   97,   97,
  359.        97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
  360.        97,   98,  100,   97,   99,   97,   97,   97,   97,   97,
  361.        97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
  362.        97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
  363.        97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
  364.        97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
  365.        97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
  366.        97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
  367.        97,   97,   97,   97,   97,   97,    0,   97,   97,   97
  368.  
  369.     } ;
  370.  
  371. static yyconst short int yy_nxt[139] =
  372.     {   0,
  373.         4,    5,    6,    7,    8,    9,   10,    9,    9,    9,
  374.        11,    9,   12,    9,    9,   13,    9,   14,   15,   16,
  375.        17,    9,   18,    9,    9,   19,   20,   23,   24,   26,
  376.        32,   35,   37,   23,   24,   44,   33,   27,   34,   70,
  377.        25,   38,   96,   95,   94,   93,   71,   45,   36,   22,
  378.        22,   23,   23,   92,   91,   90,   89,   88,   87,   86,
  379.        85,   84,   83,   82,   81,   80,   79,   78,   77,   76,
  380.        75,   74,   73,   72,   69,   68,   67,   66,   65,   64,
  381.        63,   62,   61,   60,   59,   58,   57,   56,   55,   54,
  382.        53,   52,   51,   50,   49,   48,   47,   46,   43,   42,
  383.  
  384.        41,   21,   40,   39,   31,   30,   29,   28,   21,   97,
  385.         3,   97,   97,   97,   97,   97,   97,   97,   97,   97,
  386.        97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
  387.        97,   97,   97,   97,   97,   97,   97,   97
  388.     } ;
  389.  
  390. static yyconst short int yy_chk[139] =
  391.     {   0,
  392.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  393.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  394.         1,    1,    1,    1,    1,    1,    1,    7,    7,   11,
  395.        16,   17,   18,   22,   22,   28,   16,   11,   16,   60,
  396.        99,   18,   95,   93,   89,   88,   60,   28,   17,   98,
  397.        98,  100,  100,   86,   84,   83,   81,   80,   78,   77,
  398.        76,   74,   73,   72,   71,   70,   68,   67,   66,   65,
  399.        64,   63,   62,   61,   59,   57,   56,   54,   53,   52,
  400.        51,   50,   49,   47,   45,   44,   43,   42,   40,   39,
  401.        38,   37,   36,   35,   34,   32,   30,   29,   27,   26,
  402.  
  403.        23,   21,   20,   19,   15,   14,   13,   12,    5,    3,
  404.        97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
  405.        97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
  406.        97,   97,   97,   97,   97,   97,   97,   97
  407.     } ;
  408.  
  409. static yy_state_type yy_last_accepting_state;
  410. static char *yy_last_accepting_cpos;
  411.  
  412. /* The intent behind this definition is that it'll catch
  413.  * any uses of REJECT which flex missed.
  414.  */
  415. #define REJECT reject_used_but_not_detected
  416. #define yymore() yymore_used_but_not_detected
  417. #define YY_MORE_ADJ 0
  418. #define YY_RESTORE_YY_MORE_OFFSET
  419. char *yytext;
  420. #line 1 "scanner.l"
  421. #define INITIAL 0
  422. /**
  423.  * Copyright (C) 1999, 2000, 2001  Free Software Foundation, Inc.
  424.  *
  425.  * This file is part of GNU gengetopt 
  426.  *
  427.  * GNU gengetopt is free software; you can redistribute it and/or modify 
  428.  * it under the terms of the GNU General Public License as published by 
  429.  * the Free Software Foundation; either version 2, or (at your option) 
  430.  * any later version. 
  431.  *
  432.  * GNU gengetopt is distributed in the hope that it will be useful, but 
  433.  * WITHOUT ANY WARRANTY; without even the implied warranty of 
  434.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  435.  * Public License for more details. 
  436.  *
  437.  * You should have received a copy of the GNU General Public License along 
  438.  * with gengetopt; see the file COPYING. If not, write to the Free Software 
  439.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
  440.  */
  441. #line 23 "scanner.l"
  442. #include <string.h>
  443. #include "argsdef.h"
  444. #include "parser.h"
  445. extern int gengetopt_count_line;
  446.  
  447. static void update_count_line (char *str);
  448.  
  449. #line 450 "lex.yy.c"
  450.  
  451. /* Macros after this point can all be overridden by user definitions in
  452.  * section 1.
  453.  */
  454.  
  455. #ifndef YY_SKIP_YYWRAP
  456. #ifdef __cplusplus
  457. extern "C" int yywrap YY_PROTO(( void ));
  458. #else
  459. extern int yywrap YY_PROTO(( void ));
  460. #endif
  461. #endif
  462.  
  463. #ifndef YY_NO_UNPUT
  464. static void yyunput YY_PROTO(( int c, char *buf_ptr ));
  465. #endif
  466.  
  467. #ifndef yytext_ptr
  468. static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
  469. #endif
  470.  
  471. #ifdef YY_NEED_STRLEN
  472. static int yy_flex_strlen YY_PROTO(( yyconst char * ));
  473. #endif
  474.  
  475. #ifndef YY_NO_INPUT
  476. #ifdef __cplusplus
  477. static int yyinput YY_PROTO(( void ));
  478. #else
  479. static int input YY_PROTO(( void ));
  480. #endif
  481. #endif
  482.  
  483. #if YY_STACK_USED
  484. static int yy_start_stack_ptr = 0;
  485. static int yy_start_stack_depth = 0;
  486. static int *yy_start_stack = 0;
  487. #ifndef YY_NO_PUSH_STATE
  488. static void yy_push_state YY_PROTO(( int new_state ));
  489. #endif
  490. #ifndef YY_NO_POP_STATE
  491. static void yy_pop_state YY_PROTO(( void ));
  492. #endif
  493. #ifndef YY_NO_TOP_STATE
  494. static int yy_top_state YY_PROTO(( void ));
  495. #endif
  496.  
  497. #else
  498. #define YY_NO_PUSH_STATE 1
  499. #define YY_NO_POP_STATE 1
  500. #define YY_NO_TOP_STATE 1
  501. #endif
  502.  
  503. #ifdef YY_MALLOC_DECL
  504. YY_MALLOC_DECL
  505. #else
  506. #if __STDC__
  507. #ifndef __cplusplus
  508. #include <stdlib.h>
  509. #endif
  510. #else
  511. /* Just try to get by without declaring the routines.  This will fail
  512.  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
  513.  * or sizeof(void*) != sizeof(int).
  514.  */
  515. #endif
  516. #endif
  517.  
  518. /* Amount of stuff to slurp up with each read. */
  519. #ifndef YY_READ_BUF_SIZE
  520. #define YY_READ_BUF_SIZE 8192
  521. #endif
  522.  
  523. /* Copy whatever the last rule matched to the standard output. */
  524.  
  525. #ifndef ECHO
  526. /* This used to be an fputs(), but since the string might contain NUL's,
  527.  * we now use fwrite().
  528.  */
  529. #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
  530. #endif
  531.  
  532. /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  533.  * is returned in "result".
  534.  */
  535. #ifndef YY_INPUT
  536. #define YY_INPUT(buf,result,max_size) \
  537.     if ( yy_current_buffer->yy_is_interactive ) \
  538.         { \
  539.         int c = '*', n; \
  540.         for ( n = 0; n < max_size && \
  541.                  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
  542.             buf[n] = (char) c; \
  543.         if ( c == '\n' ) \
  544.             buf[n++] = (char) c; \
  545.         if ( c == EOF && ferror( yyin ) ) \
  546.             YY_FATAL_ERROR( "input in flex scanner failed" ); \
  547.         result = n; \
  548.         } \
  549.     else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
  550.           && ferror( yyin ) ) \
  551.         YY_FATAL_ERROR( "input in flex scanner failed" );
  552. #endif
  553.  
  554. /* No semi-colon after return; correct usage is to write "yyterminate();" -
  555.  * we don't want an extra ';' after the "return" because that will cause
  556.  * some compilers to complain about unreachable statements.
  557.  */
  558. #ifndef yyterminate
  559. #define yyterminate() return YY_NULL
  560. #endif
  561.  
  562. /* Number of entries by which start-condition stack grows. */
  563. #ifndef YY_START_STACK_INCR
  564. #define YY_START_STACK_INCR 25
  565. #endif
  566.  
  567. /* Report a fatal error. */
  568. #ifndef YY_FATAL_ERROR
  569. #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
  570. #endif
  571.  
  572. /* Default declaration of generated scanner - a define so the user can
  573.  * easily add parameters.
  574.  */
  575. #ifndef YY_DECL
  576. #define YY_DECL int yylex YY_PROTO(( void ))
  577. #endif
  578.  
  579. /* Code executed at the beginning of each rule, after yytext and yyleng
  580.  * have been set up.
  581.  */
  582. #ifndef YY_USER_ACTION
  583. #define YY_USER_ACTION
  584. #endif
  585.  
  586. /* Code executed at the end of each rule. */
  587. #ifndef YY_BREAK
  588. #define YY_BREAK break;
  589. #endif
  590.  
  591. #define YY_RULE_SETUP \
  592.     YY_USER_ACTION
  593.  
  594. YY_DECL
  595.     {
  596.     register yy_state_type yy_current_state;
  597.     register char *yy_cp = NULL, *yy_bp = NULL;
  598.     register int yy_act;
  599.  
  600. #line 32 "scanner.l"
  601.  
  602.  
  603. #line 604 "lex.yy.c"
  604.  
  605.     if ( yy_init )
  606.         {
  607.         yy_init = 0;
  608.  
  609. #ifdef YY_USER_INIT
  610.         YY_USER_INIT;
  611. #endif
  612.  
  613.         if ( ! yy_start )
  614.             yy_start = 1;    /* first start state */
  615.  
  616.         if ( ! yyin )
  617.             yyin = stdin;
  618.  
  619.         if ( ! yyout )
  620.             yyout = stdout;
  621.  
  622.         if ( ! yy_current_buffer )
  623.             yy_current_buffer =
  624.                 yy_create_buffer( yyin, YY_BUF_SIZE );
  625.  
  626.         yy_load_buffer_state();
  627.         }
  628.  
  629.     while ( 1 )        /* loops until end-of-file is reached */
  630.         {
  631.         yy_cp = yy_c_buf_p;
  632.  
  633.         /* Support of yytext. */
  634.         *yy_cp = yy_hold_char;
  635.  
  636.         /* yy_bp points to the position in yy_ch_buf of the start of
  637.          * the current run.
  638.          */
  639.         yy_bp = yy_cp;
  640.  
  641.         yy_current_state = yy_start;
  642. yy_match:
  643.         do
  644.             {
  645.             register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
  646.             if ( yy_accept[yy_current_state] )
  647.                 {
  648.                 yy_last_accepting_state = yy_current_state;
  649.                 yy_last_accepting_cpos = yy_cp;
  650.                 }
  651.             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  652.                 {
  653.                 yy_current_state = (int) yy_def[yy_current_state];
  654.                 if ( yy_current_state >= 98 )
  655.                     yy_c = yy_meta[(unsigned int) yy_c];
  656.                 }
  657.             yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  658.             ++yy_cp;
  659.             }
  660.         while ( yy_base[yy_current_state] != 111 );
  661.  
  662. yy_find_action:
  663.         yy_act = yy_accept[yy_current_state];
  664.         if ( yy_act == 0 )
  665.             { /* have to back up */
  666.             yy_cp = yy_last_accepting_cpos;
  667.             yy_current_state = yy_last_accepting_state;
  668.             yy_act = yy_accept[yy_current_state];
  669.             }
  670.  
  671.         YY_DO_BEFORE_ACTION;
  672.  
  673.  
  674. do_action:    /* This label is used only to access EOF actions. */
  675.  
  676.  
  677.         switch ( yy_act )
  678.     { /* beginning of action switch */
  679.             case 0: /* must back up */
  680.             /* undo the effects of YY_DO_BEFORE_ACTION */
  681.             *yy_cp = yy_hold_char;
  682.             yy_cp = yy_last_accepting_cpos;
  683.             yy_current_state = yy_last_accepting_state;
  684.             goto yy_find_action;
  685.  
  686. case 1:
  687. YY_RULE_SETUP
  688. #line 34 "scanner.l"
  689. return TOK_PACKAGE;
  690.     YY_BREAK
  691. case 2:
  692. YY_RULE_SETUP
  693. #line 35 "scanner.l"
  694. return TOK_VERSION;
  695.     YY_BREAK
  696. case 3:
  697. YY_RULE_SETUP
  698. #line 36 "scanner.l"
  699. return TOK_OPTION;
  700.     YY_BREAK
  701. case 4:
  702. YY_RULE_SETUP
  703. #line 37 "scanner.l"
  704. yylval.argtype = ARG_STRING; return TOK_ARGTYPE;
  705.     YY_BREAK
  706. case 5:
  707. YY_RULE_SETUP
  708. #line 38 "scanner.l"
  709. yylval.argtype = ARG_INT; return TOK_ARGTYPE;
  710.     YY_BREAK
  711. case 6:
  712. YY_RULE_SETUP
  713. #line 39 "scanner.l"
  714. yylval.argtype = ARG_SHORT; return TOK_ARGTYPE;
  715.     YY_BREAK
  716. case 7:
  717. YY_RULE_SETUP
  718. #line 40 "scanner.l"
  719. yylval.argtype = ARG_LONG; return TOK_ARGTYPE;
  720.     YY_BREAK
  721. case 8:
  722. YY_RULE_SETUP
  723. #line 41 "scanner.l"
  724. yylval.argtype = ARG_FLOAT; return TOK_ARGTYPE;
  725.     YY_BREAK
  726. case 9:
  727. YY_RULE_SETUP
  728. #line 42 "scanner.l"
  729. yylval.argtype = ARG_DOUBLE; return TOK_ARGTYPE;
  730.     YY_BREAK
  731. case 10:
  732. YY_RULE_SETUP
  733. #line 43 "scanner.l"
  734. yylval.argtype = ARG_LONGDOUBLE; return TOK_ARGTYPE;
  735.     YY_BREAK
  736. case 11:
  737. YY_RULE_SETUP
  738. #line 44 "scanner.l"
  739. yylval.argtype = ARG_LONGLONG; return TOK_ARGTYPE;
  740.     YY_BREAK
  741. case 12:
  742. YY_RULE_SETUP
  743. #line 45 "scanner.l"
  744. return TOK_YES;
  745.     YY_BREAK
  746. case 13:
  747. YY_RULE_SETUP
  748. #line 46 "scanner.l"
  749. return TOK_NO;
  750.     YY_BREAK
  751. case 14:
  752. YY_RULE_SETUP
  753. #line 47 "scanner.l"
  754. return TOK_FLAG;
  755.     YY_BREAK
  756. case 15:
  757. YY_RULE_SETUP
  758. #line 48 "scanner.l"
  759. yylval.bool = 1; return TOK_ONOFF;
  760.     YY_BREAK
  761. case 16:
  762. YY_RULE_SETUP
  763. #line 49 "scanner.l"
  764. yylval.bool = 0; return TOK_ONOFF;
  765.     YY_BREAK
  766. case 17:
  767. YY_RULE_SETUP
  768. #line 50 "scanner.l"
  769. return TOK_PURPOSE;
  770.     YY_BREAK
  771. case 18:
  772. YY_RULE_SETUP
  773. #line 51 "scanner.l"
  774. return TOK_DEFAULT;
  775.     YY_BREAK
  776. case 19:
  777. YY_RULE_SETUP
  778. #line 53 "scanner.l"
  779. { return '='; }
  780.     YY_BREAK
  781. case 20:
  782. YY_RULE_SETUP
  783. #line 55 "scanner.l"
  784. yylval.chr = yytext[0]; return TOK_CHAR;
  785.     YY_BREAK
  786. case 21:
  787. YY_RULE_SETUP
  788. #line 56 "scanner.l"
  789. {
  790.   /* if you add or remove symbols, change canonize_vars
  791.      function */
  792.   yytext [strlen(yytext) - 1] = 0;
  793.   yylval.str = yytext + 1;
  794.   return TOK_STRING;
  795. }
  796.     YY_BREAK
  797. case 22:
  798. YY_RULE_SETUP
  799. #line 64 "scanner.l"
  800. {
  801.   /* if you add or remove symbols, change canonize_vars
  802.      function */
  803.   yytext [strlen(yytext) - 1] = 0;
  804.   yylval.str = yytext + 1;
  805.   update_count_line (yylval.str);
  806.   return TOK_MLSTRING;
  807. }
  808.     YY_BREAK
  809. case 23:
  810. YY_RULE_SETUP
  811. #line 73 "scanner.l"
  812. /* eat spaces */
  813.     YY_BREAK
  814. case 24:
  815. YY_RULE_SETUP
  816. #line 74 "scanner.l"
  817. /* comments begin with # in any place */
  818.     YY_BREAK
  819. case 25:
  820. YY_RULE_SETUP
  821. #line 75 "scanner.l"
  822. gengetopt_count_line++; /* return '\n'; */
  823.     YY_BREAK
  824. case 26:
  825. YY_RULE_SETUP
  826. #line 77 "scanner.l"
  827.   return 1000; /* little hack to produce a parse error too. */ 
  828. }
  829.     YY_BREAK
  830. case 27:
  831. YY_RULE_SETUP
  832. #line 81 "scanner.l"
  833. ECHO;
  834.     YY_BREAK
  835. #line 837 "lex.yy.c"
  836. case YY_STATE_EOF(INITIAL):
  837.     yyterminate();
  838.  
  839.     case YY_END_OF_BUFFER:
  840.         {
  841.         /* Amount of text matched not including the EOB char. */
  842.         int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
  843.  
  844.         /* Undo the effects of YY_DO_BEFORE_ACTION. */
  845.         *yy_cp = yy_hold_char;
  846.         YY_RESTORE_YY_MORE_OFFSET
  847.  
  848.         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
  849.             {
  850.             /* We're scanning a new file or input source.  It's
  851.              * possible that this happened because the user
  852.              * just pointed yyin at a new source and called
  853.              * yylex().  If so, then we have to assure
  854.              * consistency between yy_current_buffer and our
  855.              * globals.  Here is the right place to do so, because
  856.              * this is the first action (other than possibly a
  857.              * back-up) that will match for the new input source.
  858.              */
  859.             yy_n_chars = yy_current_buffer->yy_n_chars;
  860.             yy_current_buffer->yy_input_file = yyin;
  861.             yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
  862.             }
  863.  
  864.         /* Note that here we test for yy_c_buf_p "<=" to the position
  865.          * of the first EOB in the buffer, since yy_c_buf_p will
  866.          * already have been incremented past the NUL character
  867.          * (since all states make transitions on EOB to the
  868.          * end-of-buffer state).  Contrast this with the test
  869.          * in input().
  870.          */
  871.         if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  872.             { /* This was really a NUL. */
  873.             yy_state_type yy_next_state;
  874.  
  875.             yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
  876.  
  877.             yy_current_state = yy_get_previous_state();
  878.  
  879.             /* Okay, we're now positioned to make the NUL
  880.              * transition.  We couldn't have
  881.              * yy_get_previous_state() go ahead and do it
  882.              * for us because it doesn't know how to deal
  883.              * with the possibility of jamming (and we don't
  884.              * want to build jamming into it because then it
  885.              * will run more slowly).
  886.              */
  887.  
  888.             yy_next_state = yy_try_NUL_trans( yy_current_state );
  889.  
  890.             yy_bp = yytext_ptr + YY_MORE_ADJ;
  891.  
  892.             if ( yy_next_state )
  893.                 {
  894.                 /* Consume the NUL. */
  895.                 yy_cp = ++yy_c_buf_p;
  896.                 yy_current_state = yy_next_state;
  897.                 goto yy_match;
  898.                 }
  899.  
  900.             else
  901.                 {
  902.                 yy_cp = yy_c_buf_p;
  903.                 goto yy_find_action;
  904.                 }
  905.             }
  906.  
  907.         else switch ( yy_get_next_buffer() )
  908.             {
  909.             case EOB_ACT_END_OF_FILE:
  910.                 {
  911.                 yy_did_buffer_switch_on_eof = 0;
  912.  
  913.                 if ( yywrap() )
  914.                     {
  915.                     /* Note: because we've taken care in
  916.                      * yy_get_next_buffer() to have set up
  917.                      * yytext, we can now set up
  918.                      * yy_c_buf_p so that if some total
  919.                      * hoser (like flex itself) wants to
  920.                      * call the scanner after we return the
  921.                      * YY_NULL, it'll still work - another
  922.                      * YY_NULL will get returned.
  923.                      */
  924.                     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
  925.  
  926.                     yy_act = YY_STATE_EOF(YY_START);
  927.                     goto do_action;
  928.                     }
  929.  
  930.                 else
  931.                     {
  932.                     if ( ! yy_did_buffer_switch_on_eof )
  933.                         YY_NEW_FILE;
  934.                     }
  935.                 break;
  936.                 }
  937.  
  938.             case EOB_ACT_CONTINUE_SCAN:
  939.                 yy_c_buf_p =
  940.                     yytext_ptr + yy_amount_of_matched_text;
  941.  
  942.                 yy_current_state = yy_get_previous_state();
  943.  
  944.                 yy_cp = yy_c_buf_p;
  945.                 yy_bp = yytext_ptr + YY_MORE_ADJ;
  946.                 goto yy_match;
  947.  
  948.             case EOB_ACT_LAST_MATCH:
  949.                 yy_c_buf_p =
  950.                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
  951.  
  952.                 yy_current_state = yy_get_previous_state();
  953.  
  954.                 yy_cp = yy_c_buf_p;
  955.                 yy_bp = yytext_ptr + YY_MORE_ADJ;
  956.                 goto yy_find_action;
  957.             }
  958.         break;
  959.         }
  960.  
  961.     default:
  962.         YY_FATAL_ERROR(
  963.             "fatal flex scanner internal error--no action found" );
  964.     } /* end of action switch */
  965.         } /* end of scanning one token */
  966.     } /* end of yylex */
  967.  
  968.  
  969. /* yy_get_next_buffer - try to read in a new buffer
  970.  *
  971.  * Returns a code representing an action:
  972.  *    EOB_ACT_LAST_MATCH -
  973.  *    EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  974.  *    EOB_ACT_END_OF_FILE - end of file
  975.  */
  976.  
  977. static int yy_get_next_buffer()
  978.     {
  979.     register char *dest = yy_current_buffer->yy_ch_buf;
  980.     register char *source = yytext_ptr;
  981.     register int number_to_move, i;
  982.     int ret_val;
  983.  
  984.     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
  985.         YY_FATAL_ERROR(
  986.         "fatal flex scanner internal error--end of buffer missed" );
  987.  
  988.     if ( yy_current_buffer->yy_fill_buffer == 0 )
  989.         { /* Don't try to fill the buffer, so this is an EOF. */
  990.         if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
  991.             {
  992.             /* We matched a single character, the EOB, so
  993.              * treat this as a final EOF.
  994.              */
  995.             return EOB_ACT_END_OF_FILE;
  996.             }
  997.  
  998.         else
  999.             {
  1000.             /* We matched some text prior to the EOB, first
  1001.              * process it.
  1002.              */
  1003.             return EOB_ACT_LAST_MATCH;
  1004.             }
  1005.         }
  1006.  
  1007.     /* Try to read more data. */
  1008.  
  1009.     /* First move last chars to start of buffer. */
  1010.     number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
  1011.  
  1012.     for ( i = 0; i < number_to_move; ++i )
  1013.         *(dest++) = *(source++);
  1014.  
  1015.     if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
  1016.         /* don't do the read, it's not guaranteed to return an EOF,
  1017.          * just force an EOF
  1018.          */
  1019.         yy_current_buffer->yy_n_chars = yy_n_chars = 0;
  1020.  
  1021.     else
  1022.         {
  1023.         int num_to_read =
  1024.             yy_current_buffer->yy_buf_size - number_to_move - 1;
  1025.  
  1026.         while ( num_to_read <= 0 )
  1027.             { /* Not enough room in the buffer - grow it. */
  1028. #ifdef YY_USES_REJECT
  1029.             YY_FATAL_ERROR(
  1030. "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
  1031. #else
  1032.  
  1033.             /* just a shorter name for the current buffer */
  1034.             YY_BUFFER_STATE b = yy_current_buffer;
  1035.  
  1036.             int yy_c_buf_p_offset =
  1037.                 (int) (yy_c_buf_p - b->yy_ch_buf);
  1038.  
  1039.             if ( b->yy_is_our_buffer )
  1040.                 {
  1041.                 int new_size = b->yy_buf_size * 2;
  1042.  
  1043.                 if ( new_size <= 0 )
  1044.                     b->yy_buf_size += b->yy_buf_size / 8;
  1045.                 else
  1046.                     b->yy_buf_size *= 2;
  1047.  
  1048.                 b->yy_ch_buf = (char *)
  1049.                     /* Include room in for 2 EOB chars. */
  1050.                     yy_flex_realloc( (void *) b->yy_ch_buf,
  1051.                              b->yy_buf_size + 2 );
  1052.                 }
  1053.             else
  1054.                 /* Can't grow it, we don't own it. */
  1055.                 b->yy_ch_buf = 0;
  1056.  
  1057.             if ( ! b->yy_ch_buf )
  1058.                 YY_FATAL_ERROR(
  1059.                 "fatal error - scanner input buffer overflow" );
  1060.  
  1061.             yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
  1062.  
  1063.             num_to_read = yy_current_buffer->yy_buf_size -
  1064.                         number_to_move - 1;
  1065. #endif
  1066.             }
  1067.  
  1068.         if ( num_to_read > YY_READ_BUF_SIZE )
  1069.             num_to_read = YY_READ_BUF_SIZE;
  1070.  
  1071.         /* Read in more data. */
  1072.         YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
  1073.             yy_n_chars, num_to_read );
  1074.  
  1075.         yy_current_buffer->yy_n_chars = yy_n_chars;
  1076.         }
  1077.  
  1078.     if ( yy_n_chars == 0 )
  1079.         {
  1080.         if ( number_to_move == YY_MORE_ADJ )
  1081.             {
  1082.             ret_val = EOB_ACT_END_OF_FILE;
  1083.             yyrestart( yyin );
  1084.             }
  1085.  
  1086.         else
  1087.             {
  1088.             ret_val = EOB_ACT_LAST_MATCH;
  1089.             yy_current_buffer->yy_buffer_status =
  1090.                 YY_BUFFER_EOF_PENDING;
  1091.             }
  1092.         }
  1093.  
  1094.     else
  1095.         ret_val = EOB_ACT_CONTINUE_SCAN;
  1096.  
  1097.     yy_n_chars += number_to_move;
  1098.     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  1099.     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  1100.  
  1101.     yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
  1102.  
  1103.     return ret_val;
  1104.     }
  1105.  
  1106.  
  1107. /* yy_get_previous_state - get the state just before the EOB char was reached */
  1108.  
  1109. static yy_state_type yy_get_previous_state()
  1110.     {
  1111.     register yy_state_type yy_current_state;
  1112.     register char *yy_cp;
  1113.  
  1114.     yy_current_state = yy_start;
  1115.  
  1116.     for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
  1117.         {
  1118.         register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
  1119.         if ( yy_accept[yy_current_state] )
  1120.             {
  1121.             yy_last_accepting_state = yy_current_state;
  1122.             yy_last_accepting_cpos = yy_cp;
  1123.             }
  1124.         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1125.             {
  1126.             yy_current_state = (int) yy_def[yy_current_state];
  1127.             if ( yy_current_state >= 98 )
  1128.                 yy_c = yy_meta[(unsigned int) yy_c];
  1129.             }
  1130.         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1131.         }
  1132.  
  1133.     return yy_current_state;
  1134.     }
  1135.  
  1136.  
  1137. /* yy_try_NUL_trans - try to make a transition on the NUL character
  1138.  *
  1139.  * synopsis
  1140.  *    next_state = yy_try_NUL_trans( current_state );
  1141.  */
  1142.  
  1143. #ifdef YY_USE_PROTOS
  1144. static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
  1145. #else
  1146. static yy_state_type yy_try_NUL_trans( yy_current_state )
  1147. yy_state_type yy_current_state;
  1148. #endif
  1149.     {
  1150.     register int yy_is_jam;
  1151.     register char *yy_cp = yy_c_buf_p;
  1152.  
  1153.     register YY_CHAR yy_c = 1;
  1154.     if ( yy_accept[yy_current_state] )
  1155.         {
  1156.         yy_last_accepting_state = yy_current_state;
  1157.         yy_last_accepting_cpos = yy_cp;
  1158.         }
  1159.     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1160.         {
  1161.         yy_current_state = (int) yy_def[yy_current_state];
  1162.         if ( yy_current_state >= 98 )
  1163.             yy_c = yy_meta[(unsigned int) yy_c];
  1164.         }
  1165.     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1166.     yy_is_jam = (yy_current_state == 97);
  1167.  
  1168.     return yy_is_jam ? 0 : yy_current_state;
  1169.     }
  1170.  
  1171.  
  1172. #ifndef YY_NO_UNPUT
  1173. #ifdef YY_USE_PROTOS
  1174. static void yyunput( int c, register char *yy_bp )
  1175. #else
  1176. static void yyunput( c, yy_bp )
  1177. int c;
  1178. register char *yy_bp;
  1179. #endif
  1180.     {
  1181.     register char *yy_cp = yy_c_buf_p;
  1182.  
  1183.     /* undo effects of setting up yytext */
  1184.     *yy_cp = yy_hold_char;
  1185.  
  1186.     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1187.         { /* need to shift things up to make room */
  1188.         /* +2 for EOB chars. */
  1189.         register int number_to_move = yy_n_chars + 2;
  1190.         register char *dest = &yy_current_buffer->yy_ch_buf[
  1191.                     yy_current_buffer->yy_buf_size + 2];
  1192.         register char *source =
  1193.                 &yy_current_buffer->yy_ch_buf[number_to_move];
  1194.  
  1195.         while ( source > yy_current_buffer->yy_ch_buf )
  1196.             *--dest = *--source;
  1197.  
  1198.         yy_cp += (int) (dest - source);
  1199.         yy_bp += (int) (dest - source);
  1200.         yy_current_buffer->yy_n_chars =
  1201.             yy_n_chars = yy_current_buffer->yy_buf_size;
  1202.  
  1203.         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1204.             YY_FATAL_ERROR( "flex scanner push-back overflow" );
  1205.         }
  1206.  
  1207.     *--yy_cp = (char) c;
  1208.  
  1209.  
  1210.     yytext_ptr = yy_bp;
  1211.     yy_hold_char = *yy_cp;
  1212.     yy_c_buf_p = yy_cp;
  1213.     }
  1214. #endif    /* ifndef YY_NO_UNPUT */
  1215.  
  1216.  
  1217. #ifdef __cplusplus
  1218. static int yyinput()
  1219. #else
  1220. static int input()
  1221. #endif
  1222.     {
  1223.     int c;
  1224.  
  1225.     *yy_c_buf_p = yy_hold_char;
  1226.  
  1227.     if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  1228.         {
  1229.         /* yy_c_buf_p now points to the character we want to return.
  1230.          * If this occurs *before* the EOB characters, then it's a
  1231.          * valid NUL; if not, then we've hit the end of the buffer.
  1232.          */
  1233.         if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  1234.             /* This was really a NUL. */
  1235.             *yy_c_buf_p = '\0';
  1236.  
  1237.         else
  1238.             { /* need more input */
  1239.             int offset = yy_c_buf_p - yytext_ptr;
  1240.             ++yy_c_buf_p;
  1241.  
  1242.             switch ( yy_get_next_buffer() )
  1243.                 {
  1244.                 case EOB_ACT_LAST_MATCH:
  1245.                     /* This happens because yy_g_n_b()
  1246.                      * sees that we've accumulated a
  1247.                      * token and flags that we need to
  1248.                      * try matching the token before
  1249.                      * proceeding.  But for input(),
  1250.                      * there's no matching to consider.
  1251.                      * So convert the EOB_ACT_LAST_MATCH
  1252.                      * to EOB_ACT_END_OF_FILE.
  1253.                      */
  1254.  
  1255.                     /* Reset buffer status. */
  1256.                     yyrestart( yyin );
  1257.  
  1258.                     /* fall through */
  1259.  
  1260.                 case EOB_ACT_END_OF_FILE:
  1261.                     {
  1262.                     if ( yywrap() )
  1263.                         return EOF;
  1264.  
  1265.                     if ( ! yy_did_buffer_switch_on_eof )
  1266.                         YY_NEW_FILE;
  1267. #ifdef __cplusplus
  1268.                     return yyinput();
  1269. #else
  1270.                     return input();
  1271. #endif
  1272.                     }
  1273.  
  1274.                 case EOB_ACT_CONTINUE_SCAN:
  1275.                     yy_c_buf_p = yytext_ptr + offset;
  1276.                     break;
  1277.                 }
  1278.             }
  1279.         }
  1280.  
  1281.     c = *(unsigned char *) yy_c_buf_p;    /* cast for 8-bit char's */
  1282.     *yy_c_buf_p = '\0';    /* preserve yytext */
  1283.     yy_hold_char = *++yy_c_buf_p;
  1284.  
  1285.  
  1286.     return c;
  1287.     }
  1288.  
  1289.  
  1290. #ifdef YY_USE_PROTOS
  1291. void yyrestart( FILE *input_file )
  1292. #else
  1293. void yyrestart( input_file )
  1294. FILE *input_file;
  1295. #endif
  1296.     {
  1297.     if ( ! yy_current_buffer )
  1298.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
  1299.  
  1300.     yy_init_buffer( yy_current_buffer, input_file );
  1301.     yy_load_buffer_state();
  1302.     }
  1303.  
  1304.  
  1305. #ifdef YY_USE_PROTOS
  1306. void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
  1307. #else
  1308. void yy_switch_to_buffer( new_buffer )
  1309. YY_BUFFER_STATE new_buffer;
  1310. #endif
  1311.     {
  1312.     if ( yy_current_buffer == new_buffer )
  1313.         return;
  1314.  
  1315.     if ( yy_current_buffer )
  1316.         {
  1317.         /* Flush out information for old buffer. */
  1318.         *yy_c_buf_p = yy_hold_char;
  1319.         yy_current_buffer->yy_buf_pos = yy_c_buf_p;
  1320.         yy_current_buffer->yy_n_chars = yy_n_chars;
  1321.         }
  1322.  
  1323.     yy_current_buffer = new_buffer;
  1324.     yy_load_buffer_state();
  1325.  
  1326.     /* We don't actually know whether we did this switch during
  1327.      * EOF (yywrap()) processing, but the only time this flag
  1328.      * is looked at is after yywrap() is called, so it's safe
  1329.      * to go ahead and always set it.
  1330.      */
  1331.     yy_did_buffer_switch_on_eof = 1;
  1332.     }
  1333.  
  1334.  
  1335. #ifdef YY_USE_PROTOS
  1336. void yy_load_buffer_state( void )
  1337. #else
  1338. void yy_load_buffer_state()
  1339. #endif
  1340.     {
  1341.     yy_n_chars = yy_current_buffer->yy_n_chars;
  1342.     yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
  1343.     yyin = yy_current_buffer->yy_input_file;
  1344.     yy_hold_char = *yy_c_buf_p;
  1345.     }
  1346.  
  1347.  
  1348. #ifdef YY_USE_PROTOS
  1349. YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
  1350. #else
  1351. YY_BUFFER_STATE yy_create_buffer( file, size )
  1352. FILE *file;
  1353. int size;
  1354. #endif
  1355.     {
  1356.     YY_BUFFER_STATE b;
  1357.  
  1358.     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
  1359.     if ( ! b )
  1360.         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1361.  
  1362.     b->yy_buf_size = size;
  1363.  
  1364.     /* yy_ch_buf has to be 2 characters longer than the size given because
  1365.      * we need to put in 2 end-of-buffer characters.
  1366.      */
  1367.     b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
  1368.     if ( ! b->yy_ch_buf )
  1369.         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1370.  
  1371.     b->yy_is_our_buffer = 1;
  1372.  
  1373.     yy_init_buffer( b, file );
  1374.  
  1375.     return b;
  1376.     }
  1377.  
  1378.  
  1379. #ifdef YY_USE_PROTOS
  1380. void yy_delete_buffer( YY_BUFFER_STATE b )
  1381. #else
  1382. void yy_delete_buffer( b )
  1383. YY_BUFFER_STATE b;
  1384. #endif
  1385.     {
  1386.     if ( ! b )
  1387.         return;
  1388.  
  1389.     if ( b == yy_current_buffer )
  1390.         yy_current_buffer = (YY_BUFFER_STATE) 0;
  1391.  
  1392.     if ( b->yy_is_our_buffer )
  1393.         yy_flex_free( (void *) b->yy_ch_buf );
  1394.  
  1395.     yy_flex_free( (void *) b );
  1396.     }
  1397.  
  1398.  
  1399. #ifndef YY_ALWAYS_INTERACTIVE
  1400. #ifndef YY_NEVER_INTERACTIVE
  1401. extern int isatty YY_PROTO(( int ));
  1402. #endif
  1403. #endif
  1404.  
  1405. #ifdef YY_USE_PROTOS
  1406. void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
  1407. #else
  1408. void yy_init_buffer( b, file )
  1409. YY_BUFFER_STATE b;
  1410. FILE *file;
  1411. #endif
  1412.  
  1413.  
  1414.     {
  1415.     yy_flush_buffer( b );
  1416.  
  1417.     b->yy_input_file = file;
  1418.     b->yy_fill_buffer = 1;
  1419.  
  1420. #if YY_ALWAYS_INTERACTIVE
  1421.     b->yy_is_interactive = 1;
  1422. #else
  1423. #if YY_NEVER_INTERACTIVE
  1424.     b->yy_is_interactive = 0;
  1425. #else
  1426.     b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
  1427. #endif
  1428. #endif
  1429.     }
  1430.  
  1431.  
  1432. #ifdef YY_USE_PROTOS
  1433. void yy_flush_buffer( YY_BUFFER_STATE b )
  1434. #else
  1435. void yy_flush_buffer( b )
  1436. YY_BUFFER_STATE b;
  1437. #endif
  1438.  
  1439.     {
  1440.     if ( ! b )
  1441.         return;
  1442.  
  1443.     b->yy_n_chars = 0;
  1444.  
  1445.     /* We always need two end-of-buffer characters.  The first causes
  1446.      * a transition to the end-of-buffer state.  The second causes
  1447.      * a jam in that state.
  1448.      */
  1449.     b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
  1450.     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  1451.  
  1452.     b->yy_buf_pos = &b->yy_ch_buf[0];
  1453.  
  1454.     b->yy_at_bol = 1;
  1455.     b->yy_buffer_status = YY_BUFFER_NEW;
  1456.  
  1457.     if ( b == yy_current_buffer )
  1458.         yy_load_buffer_state();
  1459.     }
  1460.  
  1461.  
  1462. #ifndef YY_NO_SCAN_BUFFER
  1463. #ifdef YY_USE_PROTOS
  1464. YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
  1465. #else
  1466. YY_BUFFER_STATE yy_scan_buffer( base, size )
  1467. char *base;
  1468. yy_size_t size;
  1469. #endif
  1470.     {
  1471.     YY_BUFFER_STATE b;
  1472.  
  1473.     if ( size < 2 ||
  1474.          base[size-2] != YY_END_OF_BUFFER_CHAR ||
  1475.          base[size-1] != YY_END_OF_BUFFER_CHAR )
  1476.         /* They forgot to leave room for the EOB's. */
  1477.         return 0;
  1478.  
  1479.     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
  1480.     if ( ! b )
  1481.         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
  1482.  
  1483.     b->yy_buf_size = size - 2;    /* "- 2" to take care of EOB's */
  1484.     b->yy_buf_pos = b->yy_ch_buf = base;
  1485.     b->yy_is_our_buffer = 0;
  1486.     b->yy_input_file = 0;
  1487.     b->yy_n_chars = b->yy_buf_size;
  1488.     b->yy_is_interactive = 0;
  1489.     b->yy_at_bol = 1;
  1490.     b->yy_fill_buffer = 0;
  1491.     b->yy_buffer_status = YY_BUFFER_NEW;
  1492.  
  1493.     yy_switch_to_buffer( b );
  1494.  
  1495.     return b;
  1496.     }
  1497. #endif
  1498.  
  1499.  
  1500. #ifndef YY_NO_SCAN_STRING
  1501. #ifdef YY_USE_PROTOS
  1502. YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
  1503. #else
  1504. YY_BUFFER_STATE yy_scan_string( yy_str )
  1505. yyconst char *yy_str;
  1506. #endif
  1507.     {
  1508.     int len;
  1509.     for ( len = 0; yy_str[len]; ++len )
  1510.         ;
  1511.  
  1512.     return yy_scan_bytes( yy_str, len );
  1513.     }
  1514. #endif
  1515.  
  1516.  
  1517. #ifndef YY_NO_SCAN_BYTES
  1518. #ifdef YY_USE_PROTOS
  1519. YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
  1520. #else
  1521. YY_BUFFER_STATE yy_scan_bytes( bytes, len )
  1522. yyconst char *bytes;
  1523. int len;
  1524. #endif
  1525.     {
  1526.     YY_BUFFER_STATE b;
  1527.     char *buf;
  1528.     yy_size_t n;
  1529.     int i;
  1530.  
  1531.     /* Get memory for full buffer, including space for trailing EOB's. */
  1532.     n = len + 2;
  1533.     buf = (char *) yy_flex_alloc( n );
  1534.     if ( ! buf )
  1535.         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
  1536.  
  1537.     for ( i = 0; i < len; ++i )
  1538.         buf[i] = bytes[i];
  1539.  
  1540.     buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
  1541.  
  1542.     b = yy_scan_buffer( buf, n );
  1543.     if ( ! b )
  1544.         YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
  1545.  
  1546.     /* It's okay to grow etc. this buffer, and we should throw it
  1547.      * away when we're done.
  1548.      */
  1549.     b->yy_is_our_buffer = 1;
  1550.  
  1551.     return b;
  1552.     }
  1553. #endif
  1554.  
  1555.  
  1556. #ifndef YY_NO_PUSH_STATE
  1557. #ifdef YY_USE_PROTOS
  1558. static void yy_push_state( int new_state )
  1559. #else
  1560. static void yy_push_state( new_state )
  1561. int new_state;
  1562. #endif
  1563.     {
  1564.     if ( yy_start_stack_ptr >= yy_start_stack_depth )
  1565.         {
  1566.         yy_size_t new_size;
  1567.  
  1568.         yy_start_stack_depth += YY_START_STACK_INCR;
  1569.         new_size = yy_start_stack_depth * sizeof( int );
  1570.  
  1571.         if ( ! yy_start_stack )
  1572.             yy_start_stack = (int *) yy_flex_alloc( new_size );
  1573.  
  1574.         else
  1575.             yy_start_stack = (int *) yy_flex_realloc(
  1576.                     (void *) yy_start_stack, new_size );
  1577.  
  1578.         if ( ! yy_start_stack )
  1579.             YY_FATAL_ERROR(
  1580.             "out of memory expanding start-condition stack" );
  1581.         }
  1582.  
  1583.     yy_start_stack[yy_start_stack_ptr++] = YY_START;
  1584.  
  1585.     BEGIN(new_state);
  1586.     }
  1587. #endif
  1588.  
  1589.  
  1590. #ifndef YY_NO_POP_STATE
  1591. static void yy_pop_state()
  1592.     {
  1593.     if ( --yy_start_stack_ptr < 0 )
  1594.         YY_FATAL_ERROR( "start-condition stack underflow" );
  1595.  
  1596.     BEGIN(yy_start_stack[yy_start_stack_ptr]);
  1597.     }
  1598. #endif
  1599.  
  1600.  
  1601. #ifndef YY_NO_TOP_STATE
  1602. static int yy_top_state()
  1603.     {
  1604.     return yy_start_stack[yy_start_stack_ptr - 1];
  1605.     }
  1606. #endif
  1607.  
  1608. #ifndef YY_EXIT_FAILURE
  1609. #define YY_EXIT_FAILURE 2
  1610. #endif
  1611.  
  1612. #ifdef YY_USE_PROTOS
  1613. static void yy_fatal_error( yyconst char msg[] )
  1614. #else
  1615. static void yy_fatal_error( msg )
  1616. char msg[];
  1617. #endif
  1618.     {
  1619.     (void) fprintf( stderr, "%s\n", msg );
  1620.     exit( YY_EXIT_FAILURE );
  1621.     }
  1622.  
  1623.  
  1624.  
  1625. /* Redefine yyless() so it works in section 3 code. */
  1626.  
  1627. #undef yyless
  1628. #define yyless(n) \
  1629.     do \
  1630.         { \
  1631.         /* Undo effects of setting up yytext. */ \
  1632.         yytext[yyleng] = yy_hold_char; \
  1633.         yy_c_buf_p = yytext + n; \
  1634.         yy_hold_char = *yy_c_buf_p; \
  1635.         *yy_c_buf_p = '\0'; \
  1636.         yyleng = n; \
  1637.         } \
  1638.     while ( 0 )
  1639.  
  1640.  
  1641. /* Internal utility routines. */
  1642.  
  1643. #ifndef yytext_ptr
  1644. #ifdef YY_USE_PROTOS
  1645. static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
  1646. #else
  1647. static void yy_flex_strncpy( s1, s2, n )
  1648. char *s1;
  1649. yyconst char *s2;
  1650. int n;
  1651. #endif
  1652.     {
  1653.     register int i;
  1654.     for ( i = 0; i < n; ++i )
  1655.         s1[i] = s2[i];
  1656.     }
  1657. #endif
  1658.  
  1659. #ifdef YY_NEED_STRLEN
  1660. #ifdef YY_USE_PROTOS
  1661. static int yy_flex_strlen( yyconst char *s )
  1662. #else
  1663. static int yy_flex_strlen( s )
  1664. yyconst char *s;
  1665. #endif
  1666.     {
  1667.     register int n;
  1668.     for ( n = 0; s[n]; ++n )
  1669.         ;
  1670.  
  1671.     return n;
  1672.     }
  1673. #endif
  1674.  
  1675.  
  1676. #ifdef YY_USE_PROTOS
  1677. static void *yy_flex_alloc( yy_size_t size )
  1678. #else
  1679. static void *yy_flex_alloc( size )
  1680. yy_size_t size;
  1681. #endif
  1682.     {
  1683.     return (void *) malloc( size );
  1684.     }
  1685.  
  1686. #ifdef YY_USE_PROTOS
  1687. static void *yy_flex_realloc( void *ptr, yy_size_t size )
  1688. #else
  1689. static void *yy_flex_realloc( ptr, size )
  1690. void *ptr;
  1691. yy_size_t size;
  1692. #endif
  1693.     {
  1694.     /* The cast to (char *) in the following accommodates both
  1695.      * implementations that use char* generic pointers, and those
  1696.      * that use void* generic pointers.  It works with the latter
  1697.      * because both ANSI C and C++ allow castless assignment from
  1698.      * any pointer type to void*, and deal with argument conversions
  1699.      * as though doing an assignment.
  1700.      */
  1701.     return (void *) realloc( (char *) ptr, size );
  1702.     }
  1703.  
  1704. #ifdef YY_USE_PROTOS
  1705. static void yy_flex_free( void *ptr )
  1706. #else
  1707. static void yy_flex_free( ptr )
  1708. void *ptr;
  1709. #endif
  1710.     {
  1711.     free( ptr );
  1712.     }
  1713.  
  1714. #if YY_MAIN
  1715. int main()
  1716.     {
  1717.     yylex();
  1718.     return 0;
  1719.     }
  1720. #endif
  1721. #line 81 "scanner.l"
  1722.  
  1723.  
  1724. /*
  1725.   Otherwise '\n' within a TOK_MLSTRING would not be counted
  1726. */
  1727. void
  1728. update_count_line (char *str)
  1729. {
  1730.   char *p;
  1731.  
  1732.   for (p = str; *p; ++p)
  1733.     if (*p == '\n')
  1734.       ++gengetopt_count_line;
  1735. }
  1736.